package tianrun.ziguan.api.calculate.config.service.asset.module.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import tianrun.ziguan.api.calculate.config.dao.TAssetEdgeInputModuleMapper;
import tianrun.ziguan.api.calculate.config.entity.TAssetEdgeInputModule;
import tianrun.ziguan.api.calculate.config.entity.TAssetStaticPropertiesModule;
import tianrun.ziguan.api.calculate.config.service.asset.module.ITAssetEdgeInputModuleService;
import tianrun.ziguan.api.calculate.config.utils.CollectionUtil;

import java.util.Collections;
import java.util.List;
import java.util.Set;

@Service
public class TAssetEdgeInputModuleServiceImpl extends ServiceImpl<TAssetEdgeInputModuleMapper, TAssetEdgeInputModule> implements ITAssetEdgeInputModuleService {
    @Override
    public List<TAssetEdgeInputModule> getByCalAssetIds(Set<Long> assetIds) {
        if (CollectionUtil.isEmpty(assetIds))return Collections.emptyList();
        return list(Wrappers.<TAssetEdgeInputModule>lambdaQuery().in(TAssetEdgeInputModule::getCalAssetId,assetIds));

    }
}
